<?php if(!defined("BASEPATH")) exit("No direct script access allowed");
date_default_timezone_set("Asia/Ho_Chi_Minh");
//Ham chuyen ngay thang sang so nguyen
if(!function_exists('datetoint')){
	function datetoint($date){
		if(trim($date)==""){
			return 0;
		}else{
			$str_date = str_replace("/", "-",$date);
			return strtotime($str_date);
		}
	}
}

//Ham chuyen so nguyen sang ngay thang
if ( ! function_exists('inttodate')){
	function inttodate($input,$showtime=false) {
		if($showtime){
			return date("d/m/Y H:i:s",$input);
		}else{
			return date("d/m/Y",$input);
		}
	}
}
?>